// 获取组织架构的的请求接口
import request from '@/utils/request'

// 获取部门列表
export const reqGetDepts = () => request({
  url: '/company/department'
})

// 获取部门负责人的请求
export const reqGetSimpleList = () => request({
  url: '/sys/user/simple'
})

// 添加的部门的接口
export const reqAddDept = (data) => request({
  method: 'post',
  url: '/company/department',
  data
})

// 获取部门的信息
export const reqGetDeptInfo = (id) => request({
  url: `/company/department/${id}`
})

// 更新部门信息
export const reqUpdateDept = (data) => request({
  method: 'put',
  url: `/company/department/${data.id}`,
  data
})

// 删除部门的请求
export const reqDelDept = (id) => request({
  method: 'delete',
  url: `/company/department/${id}`
})
